#!/usr/env python3
from scpi import SCPI
import time

COM_PORT = "COM3"

device = SCPI(COM_PORT)
print(device.send("*IDN?"))

# disable output
device.send(":OUTPUT OFF")
# set to current source
device.send(":SOUR:FUNC CURR")
# enable auto range
device.send(":SOUR:CURR:RANGE:AUTO ON")
# set current to 100mA
device.send(":SOUR:CURR:LEV 0.1")
# enable output
device.send("OUTPUT ON")
time.sleep(5)
# disable output
device.send(":OUTPUT OFF")
device.close()

